package com.miao.util.exception;

/**
 * Created by miao on 2015/4/10.
 */
public class MyException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    private int result = 9;
    private String msg;

    public MyException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public MyException(int result, String msg) {
        super(msg);
        this.result = result;
        this.msg = msg;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getResult() {
        return this.result == 0 ? 9 : this.result;
    }

    public void setResult(int result) {
        this.result = result;
    }
}
